package com.eimf.saf.security.entity;

import com.eimf.saf.base.entity.BaseEntity;

/**
 * @author eden
 * @date 2013-11-27 上午10:27:54
 * @Description: TODO(这里用一句话描述这个类的作用)
 */
public class OrganizeOperationLogDTO extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private static final String PATTERN_MASTER = "${master}";
    private static final String PATTERN_GUEST = "${guest}";
    private static final String PATTERN_COMMENT = "${comment}";

    private String masterId;
    private String masterName;
    private String guestId;
    private String guestName;
    private String logTime;
    private String ipAddr;
    private String typeDesc;
    private String groupName;
    private String operationComment;
    private String pattern;
    private String content;

    /**
     * masterId
     * 
     * @return the masterId
     * @since 1.0.0
     */

    public String getMasterId()
    {
        return masterId;
    }

    /**
     * @param masterId the masterId to set
     */
    public void setMasterId(final String masterId)
    {
        this.masterId = masterId;
    }

    /**
     * masterName
     * 
     * @return the masterName
     * @since 1.0.0
     */

    public String getMasterName()
    {
        return masterName;
    }

    /**
     * @param masterName the masterName to set
     */
    public void setMasterName(final String masterName)
    {
        this.masterName = masterName;
    }

    /**
     * guestId
     * 
     * @return the guestId
     * @since 1.0.0
     */

    public String getGuestId()
    {
        return guestId;
    }

    /**
     * @param guestId the guestId to set
     */
    public void setGuestId(final String guestId)
    {
        this.guestId = guestId;
    }

    /**
     * guestName
     * 
     * @return the guestName
     * @since 1.0.0
     */

    public String getGuestName()
    {
        return guestName;
    }

    /**
     * @param guestName the guestName to set
     */
    public void setGuestName(final String guestName)
    {
        this.guestName = guestName;
    }

    /**
     * logTime
     * 
     * @return the logTime
     * @since 1.0.0
     */

    public String getLogTime()
    {
        return logTime;
    }

    /**
     * @param logTime the logTime to set
     */
    public void setLogTime(final String logTime)
    {
        this.logTime = logTime;
    }

    /**
     * ipAddr
     * 
     * @return the ipAddr
     * @since 1.0.0
     */

    public String getIpAddr()
    {
        return ipAddr;
    }

    /**
     * @param ipAddr the ipAddr to set
     */
    public void setIpAddr(final String ipAddr)
    {
        this.ipAddr = ipAddr;
    }

    /**
     * typeDesc
     * 
     * @return the typeDesc
     * @since 1.0.0
     */

    public String getTypeDesc()
    {
        return typeDesc;
    }

    /**
     * @param typeDesc the typeDesc to set
     */
    public void setTypeDesc(final String typeDesc)
    {
        this.typeDesc = typeDesc;
    }

    /**
     * groupName
     * 
     * @return the groupName
     * @since 1.0.0
     */

    public String getGroupName()
    {
        return groupName;
    }

    /**
     * @param groupName the groupName to set
     */
    public void setGroupName(final String groupName)
    {
        this.groupName = groupName;
    }

    /**
     * operationComment
     * 
     * @return the operationComment
     * @since 1.0.0
     */

    public String getOperationComment()
    {
        return operationComment;
    }

    /**
     * @param operationComment the operationComment to set
     */
    public void setOperationComment(final String operationComment)
    {
        this.operationComment = operationComment;
    }

    /**
     * pattern
     * 
     * @return the pattern
     * @since 1.0.0
     */

    public String getPattern()
    {
        return pattern;
    }

    /**
     * @param pattern the pattern to set
     */
    public void setPattern(final String pattern)
    {
        this.pattern = pattern;
    }

    /**
     * content
     * 
     * @return the content
     * @since 1.0.0
     */

    public String getContent()
    {
        if ((this.content == null) && (this.pattern != null))
        {
            try
            {
                this.content = this.pattern;
                if (this.masterName != null)
                {
                    this.content = this.content.replace(OrganizeOperationLogDTO.PATTERN_MASTER, this.masterName);
                }
                if (this.guestName != null)
                {
                    this.content = this.content.replace(OrganizeOperationLogDTO.PATTERN_GUEST, this.guestName);
                }
                if (this.operationComment != null)
                {
                    this.content = this.content.replace(OrganizeOperationLogDTO.PATTERN_COMMENT, this.operationComment);
                }
            } catch (final Exception e)
            {
            }
        }
        return this.content;
    }

    /**
     * @param content the content to set
     */
    public void setContent(final String content)
    {
        this.content = content;
    }

}
